home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Performance Co-Pilot 1.3
/
SGI Performance Co-Pilot 1.3.iso
/
dist
/
pcp.idb
/
usr
/
sbin
/
txmonvis.z
/
txmonvis
Wrap
Text File
|
1997-04-03
|
3KB
|
147 lines
#!/bin/sh
#
# Copyright (c) 1994 Silicon Graphics, Inc.
# ALL RIGHTS RESERVED.
#
# U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND
# Use, duplication or disclosure by the Government is subject to
# restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph
# (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
# at DFARS 252.227-7013 and/or similar or successor clauses in the FAR,
# or the DOD or NASA FAR Supplement. Contractor/manufacturer is Silicon
# Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
#
# THIS SOFTWARE CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION OF
# SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION, DISTRIBUTION, OR
# DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN
# PERMISSION OF SILICON GRAPHICS, INC.
# /
#
# $Id: txmonvis,v 2.1 1997/03/26 02:45:59 kenmcd Exp $
#
tmp=/tmp/$$
trap "rm -f $tmp.*; exit" 0 1 2 3 15
rm -f $tmp.*
verbose=false
version="2"
. /usr/pcp/lib/pmview-args
_usage()
{
echo 'Usage: txmonvis [options]
options:
-V verbose/diagnostic output
pmview(1) options:'
_pmview_usage
echo
echo 'Default title is: CPU Utilization for Host'
}
_pmview_args "$@"
if [ "X$otherArgs" != X ]
then
while getopts "?V" c $otherArgs
do
case $c
in
V)
verbose=true
;;
?)
_usage
exit 1
;;
esac
done
set - $otherArgs
set - $otherArgs
shift `expr $OPTIND - 1`
if [ $# -gt 0 ]
then
_usage
exit 1
fi
fi
rm -f $tmp.tx
if [ "X$arch" != X ]
then
pminfo -a $arch -f txmon.count >$tmp.tx
host=`pmdumplog -l $arch | awk '/^Performance/ {print $5}' | sed -e 's/,//g'`
[ "X$host" = X ] && host="unknown host"
host="$host (Archive $arch)"
elif [ "X$host" = X ]
then
host=`/usr/bsd/hostname`
fi
# if not an archive, contact the host
[ ! -f $tmp.tx ] && pminfo -f -h $host txmon.count >$tmp.tx
tx=`sed <$tmp.tx -n -e '/inst \[/{
s/"].*//
s/.*"//
p
}'`
if [ -z "$tx" ]
then
echo "$prog: cannot get inventory of transaction type names"
exit 1
fi
if [ -z "$titleArg" ]
then
titleArg="Transaction Activity for Host $host"
fi
# pmview version 2.0 assumed
#
echo >$tmp.config '# pmview 2.0
_scale 1.05
_colorlist time ( red2 blue2 )
_colorlist count ( green2 )
_grid 1 3 (
_labeledbar 0 0 (
_metrics (
txmon.max_time 30
txmon.ave_time 30
)
_metriclabels ( "max" "ave" )
_colorlist time
)
_labeledbar 0 2 (
_metrics (
txmon.count 10
)
_metriclabels ( "count" )'
echo " _instlabels away (\c" >>$tmp.config
for x in $tx
do
echo " \"$x\"\c" >>$tmp.config
done
echo >>$tmp.config ' )
_colorlist count
)
)
'
if $verbose
then
echo "pmview $version.0 Config:"
cat $tmp.config
fi
eval /usr/sbin/pmview <$tmp.config $args -title "'$titleArg'" -xrm "'*iconName: txmonvis'"
exit